#ifndef GM_ABSTRACT_HEADER
#define GM_ABSTRACT_HEADER
#include<string>
#include<fstream>
#include<sstream>
#include<iostream>
#include<algorithm>
#include<iterator>
#include<vector>
#include<map>
#include<cstdlib>
#include<ctime>
#include<cmath>
#include "def.hpp"
#include "utils.hpp"
#include "topicmodel_generic_model.hpp"
#include "boost/unordered_map.hpp" // for hashtable

class GeoTopicModel:public GenericTopicModel{
protected:
public:
  vector<int> doc_geo_stamp; // the discrete geographical info associated to documents
  vector<int> doc_user_stamp; // the discrete user info associated to documents
  double* doc_geo_value; // the real-valued geo info associated to documents
  boost::unordered_map<int,string> user_mapping;
  boost::unordered_map<string,int> user_reverse_mapping;
  boost::unordered_map<int,string> geo_mapping;
  boost::unordered_map<string,int> geo_reverse_mapping;
  
  GeoTopicModel();
  virtual void Inference()=0;
  virtual void Prediction()=0;
  virtual double Likelihood()=0;
  virtual int ReadDOCS()=0;
  virtual int GetDocuments(int)=0; // this indicate how documents are read through into the model
  virtual int SaveModel()=0;
  virtual int Interactive(){return 0;};
};

GeoTopicModel::GeoTopicModel(){
  if(PuzaDEF::Instance()->GEO_TYPE == GEO_TYPE_DISCRETE)
    doc_geo_stamp.clear();
  TM_DOCS.clear();
  user_mapping.clear();
  geo_mapping.clear();
  user_reverse_mapping.clear();
  geo_reverse_mapping.clear();
}

#endif
